﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:SLS.Controls"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                    xmlns:il="clr-namespace:Microsoft.Expression.Interactivity.Layout;assembly=Microsoft.Expression.Interactions"
                    xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
                    mc:Ignorable="d">
    <!--ImageButton Style-->
    <ItemsPanelTemplate x:Key="ItemsPanelList">
        <StackPanel Orientation="Horizontal">
            <i:Interaction.Behaviors>
                <il:FluidMoveBehavior AppliesTo="Children"
                                      Duration="0:0:1"
                                      Tag="DataContext">
                    <il:FluidMoveBehavior.EaseY>
                        <BackEase EasingMode="EaseInOut"
                                  Amplitude="0.5" />
                    </il:FluidMoveBehavior.EaseY>
                    <il:FluidMoveBehavior.EaseX>
                        <BackEase EasingMode="EaseInOut"
                                  Amplitude="0.5" />
                    </il:FluidMoveBehavior.EaseX>
                </il:FluidMoveBehavior>
            </i:Interaction.Behaviors>
        </StackPanel>
    </ItemsPanelTemplate> 
    <Style x:Key="ListBoxItemStyleKey"
           TargetType="ListBoxItem">
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" /> 
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Border x:Name="Bd"
                            BorderThickness="0">
                        <Grid> 
                                <Grid  x:Name="grid"
                                       Margin="0"
                                       HorizontalAlignment="Stretch"
                                       VerticalAlignment="Stretch" />
                                <StackPanel Orientation="Horizontal"
                                            Margin="15,5,15,5">
                                    <Label x:Name="lbl"
                                           Margin="2,0,2,0"
                                           FontSize="12"
                                           FontWeight="Bold"
                                           Content="{Binding Path=DisplayText}"
                                           HorizontalAlignment="Left"
                                           VerticalAlignment="Center" />
                                </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ToggleImage"
                     TargetType="ToggleButton">
        <Grid>
            <Image Source="{Binding Image}" />
        </Grid>
    </ControlTemplate>
</ResourceDictionary>